<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'EmployeeList.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    This List of Employees page. <br>
    <form method = "post" action = "editemployee.do">
    <c:choose>
    <c:when test="${errorFlag == true}">
    	Error....
    </c:when>
    <c:otherwise>
   		<c:forEach items="${employeeList}" var="empl">	
   			<input type = "radio" name ="employee_id" value = "${empl.id }"escapeXml="false"/>
			<c:out value="${empl.firstName}" escapeXml="false" />
			<c:out value="${empl.lastName}" escapeXml="false" />
			<br>	
		</c:forEach>
		<input type = "submit" value = "Delete"/>
	</c:otherwise>
	</c:choose>
	</form>
	
	<form method = "post" action = "addemployee.do">
	<input name = "Add" type = "submit" value = "Add">
	</form>
  </body>
</html>
